<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改商店')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-fantasyShop-edit" th:object="${fantasyShop}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店名称：</label>
				<div class="col-sm-8">
					<input id="shopName" name="shopName" th:field="*{shopName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店类型：</label>
				<div class="col-sm-8">
					<select class="form-control" name="shopType" th:with="type=${@dict.getType('shop_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${fantasyShop.shopType+'' == dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店描述：</label>
				<div class="col-sm-8">
					<input id="shopDesc" name="shopDesc" th:field="*{shopDesc}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店等级：</label>
				<div class="col-sm-8">
					<input id="shopLevel" name="shopLevel" th:field="*{shopLevel}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店经验：</label>
				<div class="col-sm-8">
					<input id="shopExp" name="shopExp" th:field="*{shopExp}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商店状态：</label>
				<div class="col-sm-8">
					<select class="form-control" name="shopStatus" th:with="type=${@dict.getType('shop_status')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${fantasyShop.shopStatus+'' == dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "fantasy/fantasyShop";
		$("#form-fantasyShop-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-fantasyShop-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
